cmake_minimum_required(VERSION 3.0)
project(Engine)

option(GLFW_BUILD_DOCS OFF)
option(GLFW_BUILD_EXAMPLES OFF)
option(GLFW_BUILD_TESTS OFF)
add_subdirectory(D:/SDK/glfw glfw.out)

option(ASSIMP_BUILD_ASSIMP_TOOLS OFF)
option(ASSIMP_BUILD_SAMPLES OFF)
option(ASSIMP_BUILD_TESTS OFF)
add_subdirectory(D:/SDK/assimp assimp.out)

if(MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
else()
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -Wextra -Wpedantic -std=c++11")
    if(NOT WIN32)
        set(GLAD_LIBRARIES dl)
    endif()
endif()

include_directories(
include/
D:/SDK/glad/include/
D:/SDK/glfw/include/
D:/SDK/glm/
D:/SDK/stb/
D:/SDK/assimp/include
)

aux_source_directory(./src DIR_ROOT_SRCS)

add_definitions(-DGLFW_INCLUDE_NONE
                -DPROJECT_SOURCE_DIR=\"${PROJECT_SOURCE_DIR}\")

add_executable(${PROJECT_NAME} D:/SDK/glad/src/glad.c ${DIR_ROOT_SRCS} include/model.h include/mesh.h)

target_link_libraries(${PROJECT_NAME} glfw ${GLFW_LIBRARIES} ${GLAD_LIBRARIES} assimp)